<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			div{
				width: 100px;
				height: 90px;
				background: red;
				position: absolute;
				left: 0;
			}
		</style>
		
		<script>
			window.onload = function()
			{
				let div = document.querySelector('div');
				window.onkeyup = function(event)
				{
					console.log(event.key);
					if(event.key == 'ArrowRight')
					{
						div.style.left = div.offsetLeft + 100 + 'px';
					}
					
					if(event.key == 'ArrowLeft')
					{
						div.style.left = div.offsetLeft - 100 + 'px';
					}
				}
			}
		</script>
	</head>
	<body>
		<div></div>
	</body>
</html>